package com.sx213.service.impl;

import com.sx213.domain.User;
import com.sx213.mapper.UserMapper;
import com.sx213.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author liliang
 * @Description: 用户接口实现类
 * @Date 18/1/4 上午11:01
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> getUserList() {
        return userMapper.getUserList();
    }

    @Override
    public User getUserById(String userId) {
        return userMapper.getUserById(userId);
    }

    @Override
    public void updateUserEmailById(String userId, String sex) {
        userMapper.updateUserEmailById(userId,sex);
    }

    @Override
    public void deleteUserById(String userId) {
        userMapper.deleteUserById(userId);
    }

    @Override
    public void insertUser(User user) {
        userMapper.insertUser(user);
    }
}
